package com.cmpe451.nutty.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "APP_PRIVILEGE")
public class Privilege implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "NAME", nullable = false, length = 100, unique = true)
    private String name;

    @Column(name = "DESCRIPTION", nullable = true, length = 256)
    private String description;

    @Override
    public String toString() {
	StringBuilder builder = new StringBuilder();
	builder.append("Privilege [name=");
	builder.append(name);
	builder.append(", description=");
	builder.append(description);
	builder.append("]");
	return builder.toString();
    }

    public String getName() {
	return name;
    }

    public void setName(String name) {
	this.name = name;
    }

    public String getDescription() {
	return description;
    }

    public void setDescription(String description) {
	this.description = description;
    }

}
